<template>
<div class="div">
  <el-menu
    :default-active="activeIndex"
    class="el-menu-demo"
    mode="horizontal"
    @select="handleSelect"
     background-color="#545c64"
  text-color="#fff"
  active-text-color="#ffd04b"
  >
    <el-menu-item index="3">车辆列表</el-menu-item>
    <el-menu-item index="1">审核通过</el-menu-item>
    <el-menu-item index="2">审核失败</el-menu-item>
    <el-menu-item index="0">待审核</el-menu-item>
    <el-menu-item index="4">已下架</el-menu-item>
  </el-menu>
  <el-main class="main">
          <router-view :nowIndex="activeIndex"></router-view>
</el-main>
</div>
</template>

<script>
 export default {
    data() {
      return {
        activeIndex: '3',
      };
    },
    watch: {
    },
    methods: {
      handleSelect(key, keyPath) {
        this.activeIndex=key
      }
    }
  }
</script>

<style>
.div{
  height: 100%;
}
</style>